class Goods():
	def __init__(self,price=0):
		self.__price=price
		if(price>=0 and price<=100):
			self.__price=price
		else:
			print("Price Err.")

	def setPrice(self,price):
		if(price>=0 and price<=100):
			self.__price=price
		else:
			print("Price Err.")

	@property
	def price(self):
		return self.__price	


	@price.setter
	def price(self,price):
		if(price>=0 and price<=100):
			self.__price=price
		else:
			print("Price Err.")


g1=Goods()
g1.setPrice(18)
g1.setPrice(1000)
print(g1.price)
g1.price=1000
print(g1.price)




